package com.css.upms.biz.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.css.upms.api.entity.SysUserRole;
import com.css.upms.biz.mapper.SysUserRoleMapper;
import com.css.upms.biz.service.SysUserRoleService;
import org.springframework.stereotype.Service;

/**
 * 用户角色关系
 *
 * @author hanyx
 * @date 2019-05-03 02:40:17
 */
@Service("sysUserRoleService")
public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUserRole> implements SysUserRoleService {

    /**
     * 用户角色关系简单分页查询
     *
     * @param sysUserRole 用户角色关系
     * @return
     */
    @Override
    public IPage<SysUserRole> getSysUserRolePage(Page<SysUserRole> page, SysUserRole sysUserRole) {
        return baseMapper.getSysUserRolePage(page, sysUserRole);
    }

    @Override
    public Boolean removeRoleByUserId(String userId) {
        return baseMapper.deleteByUserId(userId);
    }

}
